package com.guaoran.headFirst.stategy.interfaces.impl;

import com.guaoran.headFirst.stategy.Duck;
import com.guaoran.headFirst.stategy.interfaces.FlyBehavior;
import com.guaoran.headFirst.stategy.interfaces.QuackBehavior;

/**
 * @author : 孤傲然
 * @Description :
 * @date :2018/3/26 23:15
 */
public class ModelDuck extends Duck {
    @Override
    public void display() {
        System.out.println("ModelDuck...display");
    }

    public ModelDuck(){
        this.flyBehavior = new FlyNoWay();
        this.quackBehavior = new Quack();
    }
    public ModelDuck(FlyBehavior flyBehavior,QuackBehavior quackBehavior){
        this.flyBehavior = flyBehavior;
        this.quackBehavior = quackBehavior;
    }
}
